<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE HTML>
<html>
  <head>
    <title>天安财险</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="${ctxStatic }/zTreeStyle/zTreeStyle.min.css" type="text/css" rel="stylesheet" />
    <script src="${ctxStatic }/zTreeStyle/jquery.ztree.all-3.5.min.js"></script>
	<style type="text/css">
		.ztree {overflow:auto;margin:0;_margin-top:10px;padding:10px 0 0 10px;}
	</style>
  </head>
  
  <body>
  <div id="content" class="row-fluid">
        <div id="left" class="accordion-group">
            <div class="accordion-heading">
                <a class="accordion-toggle">组织机构<i class="icon-refresh pull-right" ></i></a>
            </div>
            <div id="ztree" class="ztree" style="width: 170px; height: 696px;"></div>
        </div>
        <div id="openClose" class="close">&nbsp;</div>
        <div id="right">
            <iframe id="officeContent" src="surveyList.html" width="100%" height="91%"
                    frameborder="0"></iframe>
        </div>
    </div>
    
    <script type="text/javascript">
    var icon = "${ctxStatic }/zTreeStyle/img/diy/8.png";
    var zTreeObj,
            setting = {

            },
            zTreeNodes = [
                {"name":"天安财险", open:true, isParent:true, children: [
                    { "name":"上海市分公司","icon":icon},
                    { "name":"江苏省分公司","icon":icon},
                    { "name":"北京市分公司","icon":icon}
                ]
                }
            ];

    $(function(){
        zTreeObj = $.fn.zTree.init($("#ztree"), setting, zTreeNodes);

    });
    
    
    
    var leftWidth = 160; // 左侧窗口大小
    var tabTitleHeight = 33; // 页签的高度
    var htmlObj = $("html"), mainObj = $("#main");
    var headerObj = $("#header"), footerObj = $("#footer");
    var frameObj = $("#left, #openClose, #right, #right iframe");
    function wSize(){
        var minHeight = 500, minWidth = 980;
        var strs = getWindowSize().toString().split(",");
        htmlObj.css({"overflow-x":strs[1] < minWidth ? "auto" : "hidden", "overflow-y":strs[0] < minHeight ? "auto" : "hidden"});
        mainObj.css("width",strs[1] < minWidth ? minWidth - 10 : "auto");
        frameObj.height((strs[0] < minHeight ? minHeight : strs[0]) - headerObj.height() - footerObj.height() - (strs[1] < minWidth ? 42 : 28));
        $("#openClose").height($("#openClose").height() - 5);
        wSizeWidth();
    }
    function wSizeWidth(){
        if (!$("#openClose").is(":hidden")){
            var leftWidth = ($("#left").width() < 0 ? 0 : $("#left").width());
            $("#right").width($("#content").width()- leftWidth - $("#openClose").width() -5);
        }else{
            $("#right").width("100%");
        }
    }
    wSizeWidth();
    </script>
    
    <script type="text/javascript" src="${ctxStatic }/js/wsize.js"></script>
  </body>
</html>
